using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for MenuManager
/// </summary>
public class MenuManager
{   
    public MenuManager()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public static void SetActive(HtmlGenericControl activeControl, string activeClass)
    {
        activeControl.Attributes.Add("class", activeClass);
    }

    public static bool IsUserManagementSection()
    {
        if (PageManager.IsPage(SitePages.BO_CreateUser) ||
            PageManager.IsPage(SitePages.BO_EditUser) ||
            PageManager.IsPage(SitePages.BO_ListUser))
        {
            return true;
        }

        return false;
    }

    public static bool IsBookManagementSection()
    {
        if (PageManager.IsPage(SitePages.BO_CreateBook) ||
            PageManager.IsPage(SitePages.BO_EditBook) ||
            PageManager.IsPage(SitePages.BO_ListBook))
        {
            return true;
        }

        return false;
    }

    public static bool IsPublisherManagementSection()
    {
        if (PageManager.IsPage(SitePages.BO_CreatePublisher) ||
            PageManager.IsPage(SitePages.BO_EditPublisher) ||
            PageManager.IsPage(SitePages.BO_ListPublisher))
        {
            return true;
        }

        return false;
    }

    public static bool IsPublicationManagementSection()
    {
        if (PageManager.IsPage(SitePages.BO_CreatePublication) ||
            PageManager.IsPage(SitePages.BO_EditPublication) ||
            PageManager.IsPage(SitePages.BO_ListPublication))
        {
            return true;
        }

        return false;
    }

    public static bool IsLanguageManagementSection()
    {
        if (PageManager.IsPage(SitePages.BO_CreateLanguage) ||
            PageManager.IsPage(SitePages.BO_EditLanguage) ||
            PageManager.IsPage(SitePages.BO_ListLanguage))
        {
            return true;
        }

        return false;
    }

    public static bool IsCategoryManagementSection()
    {
        if (PageManager.IsPage(SitePages.BO_CreateCategory) ||
            PageManager.IsPage(SitePages.BO_EditCategory) ||
            PageManager.IsPage(SitePages.BO_ListCategory))
        {
            return true;
        }

        return false;
    }
}
